import {Component, OnInit, ViewChild} from '@angular/core';
import {BsModalRef, BsModalService} from 'ngx-bootstrap';

export let Zero3Alert: Zero3AlertComponent;

@Component({
    selector: 'app-zero3-alert',
    templateUrl: './zero3-alert.component.html',
    styleUrls: ['./zero3-alert.component.css']
})
export class Zero3AlertComponent implements OnInit {

    @ViewChild('template')
    template;

    public message: string;

    private modalRef: BsModalRef;

    constructor(private modalService: BsModalService) {
        Zero3Alert = this;
    }

    req(message: string): void {
        this.message = message;
        this.modalRef = this.modalService.show(this.template, {class: 'modal-sm'});
    }

    ok(): void {
        this.modalRef.hide();
    }

    ngOnInit(): void {
    }

}
